package net.wanho.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.Date;

/**
 * 配置类
 */
@Configuration
public class SpringConfig {

    /**
     * 向Spring容器中添加一个bean/组件
     */
    @Bean
    public Date date(){
        Date date = new Date();
        date.setYear(2008-1900);
        date.setMonth(8);
        date.setDate(8);
        return date;
    }

}
